import React, { Component } from 'react';

import './index.css';
import {IOS_DOWNLOAD_URL } from '../../constants/Api';


class Index extends Component {
	constructor(props) {
		super(props);
		this.state = {
			stpContan: [
				{ "text": "第一步: 点击取消", "image": require('../../assets/images/icon_step_1.png') },
				{ "text": "第二步: 点击进入设置", "image": require('../../assets/images/icon_step_2.png') },
				{ "text": "第三步: 点击进入通用", "image": require('../../assets/images/icon_step_3.png') },
				{ "text": "第四步: 点击进入设备管理", "image": require('../../assets/images/icon_step_4.png') },
				{ "text": "第五步: 点击速租企业级引用", "image": require('../../assets/images/icon_step_5.png') },
				{ "text": "第六步: 点击信任", "image": require('../../assets/images/icon_step_6.png') },
				{ "text": "设置完成! 不要删除应用哦!", "image": require('../../assets/images/icon_step_7.png') },

			]
		}


	};

	junToDown = () => {
		window.location.href = IOS_DOWNLOAD_URL;
	}



	render() {
		return (
			<div className="mainContent">

				<div className="iOSGuide">
					<img src={require('../../assets/images/bannar_iOSDownload.png')} alt="" className="banner" />
					<div className="toast_">
						(提示: 如果无法下载,请把"速租"APP卸载后再重试)
			</div>
					{
						this.state.stpContan.map((item, index) => {
							return (
								<div key={index}>
									<p className="stepItem">
										<img src="" alt="" className="titleIcon" />
										<a>{item.text}</a>
										<img src="" alt="" className="titleIcon" />
									</p>
									<img src={item.image} alt="" className="stepImg" />
								</div>
							)
						})
					}

					<a onClick={() => {
						this.junToDown()
					}} className="download">下载</a>
				</div>
			</div>
		);
	}
}

export default Index;
